package com.jic.product.mapper;

import java.lang.Long;
import java.util.List;

import com.jic.product.entity.ProductGuaranteeRelation;
import com.jic.product.rest.response.ProductGuaranteeResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 商品保障关联表
 *
 * @author :
 * @version : v1.0.0
 * @email :
 * @since : 2020-01-13 08:07:30
 */
@Mapper
public interface ProductGuaranteeRelationMapper {

    long insert(ProductGuaranteeRelation productGuaranteeRelation);

    long delete(Long id);

    long update(ProductGuaranteeRelation productGuaranteeRelation);

    ProductGuaranteeRelation queryByPrimaryKey(Long id);

    List<ProductGuaranteeRelation> query(ProductGuaranteeRelation productGuaranteeRelation);

    List<ProductGuaranteeRelation> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("productGuaranteeRelation") ProductGuaranteeRelation productGuaranteeRelation);

    long queryPageCount(ProductGuaranteeRelation productGuaranteeRelation);

    long deleteProductGuarantee(@Param("productId") Long productId);

    //h5根据上皮id 查询上品保障
    List<ProductGuaranteeResponse> queryByProductId(@Param("productId") Long id);


}